<?php
require_once APPPATH.'third_party/base_controller'.EXT;
    class Search extends Base_Controller
    {
        function __construct()
        {
            parent::__construct();
            $this->cache->clean();
            $this->output->cache(5);
            
        }
        function index()
        {
			$data = array();
            $this->cache->clean();
            $this->output->cache(5);
			$this->load_render($this->load->view('search',$data,TRUE));
		}
		function result()
		{
			$data = array();
            $this->cache->clean();
            $this->output->cache(5);
			$key = mysql_escape_string(trim($this->input->get('p')));			
			$data['result'] = $this->search_model->result_search($key);
			$data['title'] = "BÚT BI - MÓC KHÓA - BẬT LỬA | Tìm kiếm";
			$this->load_render($this->load->view('search',$data,TRUE));
			
		}
	}
?>	
	